#ifndef RECIPE_H_
#define RECIPE_H_

#include <string>
#include <iostream>

// other types
#include "Instructions.h"                               //FPW, A1
using namespace std;
 
struct Recipe {
public:
        // constructors
        Recipe (int id, string n, Instructions a)       //FPW, A1
                : recipe_id(id), chef_name(n), instr(a) {}

   // utility functions                                                                 //FPW, A1
        string display() const;                                                         //FPW, A1
        void displaym() const {                                                         //FPW, A1
                cout << recipe_id << " " << chef_name << " ";   //FPW, A1
                instr.displaym();
        }
        
		/* MGM B.1 b: START */
		//getter
		int recipeId() const{return recipe_id;}
		string chefName() const{return chef_name;}
    //FPW - D.1
		string getInstr() const{
			return instr.get_instr();
		}
		//end of FPW - D.1		/* MGM B.1 b: END */
    
		//MGM D3: override the operator < to sort the recipe based on recipe ID
		bool operator < (const Recipe& r) const
		{
			return (recipe_id < r.recipe_id);
		}
		
    /* The following utility functions were written by Fransiska Putri Wina, solving problem B1a */
	void displayins() const {
		instr.displaym();
	}
	/* End of code by FPW */
		
private:
   //constants
     
   // private data
        int recipe_id;
        string chef_name;
        Instructions instr;                     //FPW, A1
};


#endif //RECIPE_H_
